class Man:
    def eat(self):
        print("饿了，吃饭啦")

class Chinese(Man):
    def eat(self):
        print("中国人吃饭用筷子")
class English(Man):
    def eat(self):
        print("英国人吃饭用叉子")

class Indian(Man):
    def eat(self):
        print("印度人吃饭用手")

def manEat(m):
    if isinstance(m,Man):
        m.eat()
    else:
        print("不能吃饭")

manEat(Chinese())

class Person:
    def __init__(self,name):
        self.name = name

    def __add__(self,other):
        if isinstance(other,Person):
            return "{0}--{1}".format(self.name,other.name)
        else:
            return "不是同类"

p1 = Person("ljx")
p2 = Person(19)

x = p1+p2
print(x)


